package com.jsgt.greekfire.bean

import android.os.Parcel
import android.os.Parcelable

class AssetsBean() : Parcelable {
    var guid: String? = null
    var assetGuid: String? = null//1管理币，2 usdt,3 utit,4 ut
    var assetBalance: Double? = null
    var assetName: String? = null
    var assetFrozen: Double? = null
    var display: Int? = null
    var price: Double? = 0.00//管理费
    var recharge_address: String? = null
    var transfer_address: String? = null
    val gfcPrice: Double = 0.0
    val usdtPrice: Double = 0.0

    constructor(parcel: Parcel) : this() {
        guid = parcel.readString()
        assetGuid = parcel.readString()
        assetBalance = parcel.readValue(Double::class.java.classLoader) as? Double
        assetName = parcel.readString()
        assetFrozen = parcel.readValue(Double::class.java.classLoader) as? Double
        display = parcel.readValue(Int::class.java.classLoader) as? Int
        price = parcel.readValue(Double::class.java.classLoader) as? Double
        recharge_address = parcel.readString()
        transfer_address = parcel.readString()
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(guid)
        parcel.writeString(assetGuid)
        parcel.writeValue(assetBalance)
        parcel.writeString(assetName)
        parcel.writeValue(assetFrozen)
        parcel.writeValue(display)
        parcel.writeValue(price)
        parcel.writeString(recharge_address)
        parcel.writeString(transfer_address)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<AssetsBean> {
        override fun createFromParcel(parcel: Parcel): AssetsBean {
            return AssetsBean(parcel)
        }

        override fun newArray(size: Int): Array<AssetsBean?> {
            return arrayOfNulls(size)
        }
    }
}